<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> 
<head>
<%@ include file="../../include/easyui.jsp" %>
<%@ include file="../../include/pGrid.jsp" %>
<title></title>
<script>
	$(function(){
		var param = {pNo: '${param.pNo}',pNo_searchType:'eq'};
		/*列表初始化*/
		var gridParam = {
			url : '/console/com.fs.jzzn.pojo.Income/list',
			columns: [[ 
				  	 {field: "incomeNo", title: "单据编号", width: 120}
			    	 ,{field: "pNo", title: "路段编号", width: 120}
			    	 ,{field: "money",title: "回款金额", width: 120}
			    	 ,{field: "returnedDate", "title": "回款日期", width: 120}
			    	 ,{field: "verifyUserName", title: "回款确认人", width: 120}
			    	 ,{field: "companyName", title: "对方户名", width: 250}
			    	 ,{field: "billsNo",title: "凭单号", width: 120}
			    	 ,{field : "department",width : 120,title: "关联项目部"}
					,{field : "remark",width : 150,title: "备注"}
					,{field : "createTime",width : 130,title: "创建时间"}
					,{field : "createrName",width : 130,title: "创建人"}
			]],
			queryParams: param,
			onLoadSuccess:function(data){
				p.total({tip:'合计:', tipName:'pNo', fields:[{name:'money',total:'sum',tip:'合计:'}] });
			},
			singleSelect : true
		};
		p.dataGrid = $(p.dataGrid).datagrid( $.extend({}, p.dataGridParam, gridParam));

		/*事件响应*/
		$("#toolbar .easyui-linkbutton").on("click", function() {
			var motion_code = $(this).attr("motion_code");p.btnOneClick($(this));
			switch (motion_code) {
				case "05":
					p.gridQuery();
					break;
				case "07":
					p.down({filename:'收入统计',url:'/console/income/export',local:true });
					break;
				default:
					break;
			}
		});
	});
</script>
</head>
<body>
		<div id="toolbar" style="padding:3px;">
			<a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" motion_code="05">刷新</a>
			<a href="#" class="easyui-linkbutton" iconCls="icon-excel" plain="true" motion_code="07">导出</a>
		</div>
		<!-- 表格 -->
		<table id="dataGrid" style="height:100%;"></table>
</body>
</html>